package test_func

import "fmt"

func Do() {
	fmt.Println("最大值5/6 ", max(5, 6))
	a, b := sortAB(5, 6)
	fmt.Println("排序5/6 ", a, b)
	swap(&a, &b)
}

func max(a int, b int) int {
	if a > b {
		return a
	}
	return b
}

func sortAB(a int, b int) (int, int) {
	if a > b {
		return a, b
	}
	return b, a
}

func swap(a *int, b *int) {
	fmt.Println(*a)
	fmt.Println(*b)
	temp := a
	a = b
	b = temp
	fmt.Println(*a)
	fmt.Println(*b)
}
